package com.binguo.common.util;



public class CommonUtil {

	public static Integer getSerial(String serial) {

		if(serial == null || "".equals(serial)){
			return null;
		}
		if (serial.contains("_")) {
			return Integer.parseInt(serial.split("_")[1]);
		}else {
			return Integer.parseInt(serial);
		}

	}

	public static String plusSerial(String serial){
		if(serial == null || "".equals(serial)){
			return null;
		}
		Integer shopId = Integer.parseInt(serial.split("_")[0]);
		Integer newSerial = Integer.parseInt(serial.split("_")[1]) + 1;
		return shopId + "_" + newSerial;

	}



	public static void main(String[] args) {
		String a = CommonUtil.plusSerial("1_111");
		System.out.println(a);
	}
}
